package com.hn.hnspringbootdemo.controller;

import com.hn.hnspringbootdemo.entity.*;
import com.hn.hnspringbootdemo.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {
    @Autowired
    TestService testService;

    /**
     * 查询余额
     * @param p
     * @return
     */
    @RequestMapping(value = "/getQueryOweFee")
    @ResponseBody
    public OutParameter<QueryOweFeeResponse> getQueryOweFee(@RequestBody Params<QueryOweFeeParams> p) {
        return testService.getQueryOweFee(p);
    }
    /**
     * 测试一下
     *
     * @return
     */
    @RequestMapping("/getTest")
    @ResponseBody
    public OutParameter<QueryOweFeeResponse> getQueryOweFee() {
        Params<QueryOweFeeParams> p = new Params<QueryOweFeeParams>();
        return testService.getQueryOweFee(p);
    }
    /**
     * 查询专款余额
     * @param p
     * @return
     */
    @RequestMapping(value = "/getQuerySpeFunds", method = RequestMethod.GET)
    @ResponseBody
    public OutParameter<QuerySpeFundsResponse> getQuerySpeFunds(@RequestBody Params<QueryOweFeeParams> p) {
        return testService.getQuerySpeFunds(p);
    }
}
